{# SPDX-FileCopyrightText: © 2015 Siemens AG

   SPDX-License-Identifier: FSFAP
#}
{% extends "include/base.html.twig" %}
{% block styles %}
  {{ parent() }}
  <link rel="stylesheet" href="css/jquery.treeview.css"/>
  <link rel="stylesheet" href="css/select2.min.css"/>
{% endblock %}

{% block content %}
{{ 'Select a folder on the left hand side to move or copy content to a different folder'|trans }}
<table>
  <tr style="vertical-align:top;">
    <td id="sidetree">
      <div id="sidetreecontrol" style="display:inline;"><a href="?#">{{ 'Collapse All'|trans }}</a> | <a href="?#">{{ 'Expand All'|trans }}</div>
      {{ folderTree }}
    </td>
    <td style="padding-left:20px;">
      <form name="formy" method="post">
        <input type="hidden" name="fromFolder" id="fromFolder" value="-1"/>

        <label for="foldercontent">{{ 'Select uploads or folders you wish to move'|trans }}:<br/>
          <select name="foldercontent[]" id="foldercontent" multiple="multiple" size="20">
          </select>
        </label>
        <br/>
        <br/>

        <label for="toFolder">{{ 'Select the folder where the content shall be placed'| trans }}:<br/>
          {% include 'components/select-folder.html.twig' with {'name':'toFolder', 'id': 'toFolder'}  %}
        </label>
        <br/>
        <br/>

        <input type="submit" name="move" value="{{ 'Move'|trans }}"/> &nbsp; <input type="submit" name="copy" value="{{ 'Copy'|trans }}"/>
      </form>
    </td>
  </tr>
</table>
{% endblock %}


{% block foot %}
  {{ parent() }}
  <script src="scripts/tools.js" type="text/javascript"></script>
  <script src="scripts/jquery.treeview.js" type="text/javascript"></script>
  <script src="scripts/select2.full.min.js" type="text/javascript"></script>
  <script>
    $(document).ready(function () {
      $('#toFolder').select2({
        "placeholder": "Select folder"
      });
    });
  </script>
  <script type="text/javascript">{% include 'admin_content_move.js.twig' %}</script>
{% endblock %}
